const getExecTime = () => {
  const currentMinute = new Date().getMinutes();
  return [currentMinute, (currentMinute + 30) % 60];
};

const group = (array, subGroupLength) => {
  let index = 0;
  const newArray = [];
  while (index < array.length) {
    newArray.push(array.slice(index, index += subGroupLength));
  }
  return newArray;
};

module.exports = {
  getExecTime,
  group,
};
